import api from '../http'
import { queryDataModel } from './model'

//获取预约列表
export const apiGetPageList = (params: queryDataModel) => {
  return api({
    url: `/reservation/pageList`,
    method: 'GET',
    params,
  })
}

//获取医生预约记录
export const apiGetUserList = (params: any) => {
  return api({
    url: `/reservation/list`,
    method: 'GET',
    params,
  })
}

//添加就诊记录
export const apiAddDiagnosis = (data) => {
  return api({
    url: `/diagnosis/add`,
    method: 'POST',
    data,
  })
}

// 对用户进行过号
export const apiOverUser = (id) => {
  return api({
    url: `/reservation/over/${id}`,
    method: 'GET',
  })
}

//获取过期七天的数据
export const apiSevenDaysNum = (id) => {
  return api({
    url: `/reservation/sevenDaysNum`,
    method: 'GET',
  })
}

// 根据预约id获取预约详情
export const apiGetInfo = (id: number) => {
  return api({
    url: `/reservation/details/${id}`,
    method: 'GET',
  })
}

//根据预约id获取就诊信息
export const apiGetDiagnosis = (reservationId: number) => {
  return api({
    url: `/diagnosis/details/${reservationId}`,
    method: 'GET',
  })
}
